package com.daguchuangyi.erp_android.model.product;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

/**
 * Created by lijianjian on 2018/3/24.
 */

public class Shelf implements Parcelable {

    @SerializedName("id")
    @Expose
    private int id;
    @SerializedName("SNO")
    @Expose
    private String sNO;
    @SerializedName("color")
    @Expose
    private String color;
    @SerializedName("remark")
    @Expose
    private String remark;
    @SerializedName("PNO")
    @Expose
    private String pNO;
    @SerializedName("productId")
    @Expose
    private int productId;
    @SerializedName("number")
    @Expose
    private int number;
    @SerializedName("unit")
    @Expose
    private String unit;
    @SerializedName("createdAt")
    @Expose
    private String createdAt;
    @SerializedName("updatedAt")
    @Expose
    private String updatedAt;
    public final static Parcelable.Creator<Shelf> CREATOR = new Creator<Shelf>() {


        @SuppressWarnings({
                "unchecked"
        })
        public Shelf createFromParcel(Parcel in) {
            return new Shelf(in);
        }

        public Shelf[] newArray(int size) {
            return (new Shelf[size]);
        }

    }
            ;

    protected Shelf(Parcel in) {
        this.id = ((int) in.readValue((int.class.getClassLoader())));
        this.sNO = ((String) in.readValue((String.class.getClassLoader())));
        this.color = ((String) in.readValue((String.class.getClassLoader())));
        this.remark = ((String) in.readValue((String.class.getClassLoader())));
        this.pNO = ((String) in.readValue((String.class.getClassLoader())));
        this.productId = ((int) in.readValue((int.class.getClassLoader())));
        this.number = ((int) in.readValue((int.class.getClassLoader())));
        this.unit = ((String) in.readValue((String.class.getClassLoader())));
        this.createdAt = ((String) in.readValue((String.class.getClassLoader())));
        this.updatedAt = ((String) in.readValue((String.class.getClassLoader())));
    }

    public Shelf() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getSNO() {
        return sNO;
    }

    public void setSNO(String sNO) {
        this.sNO = sNO;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getPNO() {
        return pNO;
    }

    public void setPNO(String pNO) {
        this.pNO = pNO;
    }

    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(String createdAt) {
        this.createdAt = createdAt;
    }

    public String getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(String updatedAt) {
        this.updatedAt = updatedAt;
    }

    public void writeToParcel(Parcel dest, int flags) {
        dest.writeValue(id);
        dest.writeValue(sNO);
        dest.writeValue(color);
        dest.writeValue(remark);
        dest.writeValue(pNO);
        dest.writeValue(productId);
        dest.writeValue(number);
        dest.writeValue(unit);
        dest.writeValue(createdAt);
        dest.writeValue(updatedAt);
    }

    public int describeContents() {
        return 0;
    }
}
